
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/wondershare/js/jquery.js"></script> 
<script src="/wondershare/js/ad.js"></script> 
<link href="/wondershare/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/wondershare/styles/general.css" rel="stylesheet" type="text/css" />
<script src="/wondershare/js/jquery.cvbox.min.js"></script> 

<title>WS广告管理</title>

<script type="text/javascript">  


 </script>
 <style type="text/css">

catListTag {
	DISPLAY: none
}
.cvBoxShade {
	Z-INDEX: 2000; BACKGROUND: #ccc; LEFT: 0px; WIDTH: 100%; POSITION: absolute; TOP: 0px; HEIGHT: 0px
}
.cvBoxBorder {
	BORDER-RIGHT: #000000 0px solid; PADDING-RIGHT: 8px; BORDER-TOP: #000000 0px solid; PADDING-LEFT: 8px; FONT-SIZE: 12px; Z-INDEX: 2000; PADDING-BOTTOM: 8px; BORDER-LEFT: #000000 0px solid; WIDTH: 100%; PADDING-TOP: 8px; BORDER-BOTTOM: #000000 0px solid; POSITION: absolute; BACKGROUND-COLOR: #ccc
}
.cvBoxBorder A {
	COLOR: #486aaa; TEXT-DECORATION: none
}
.cvBoxBorder A:hover {
	COLOR: #c00; TEXT-DECORATION: none
}
.cvBoxTitleBar {
	WIDTH: 100%; LINE-HEIGHT: 27px; HEIGHT: 26px; BACKGROUND-COLOR: #eeeeee
}
.cvBoxTitleBarText {
	PADDING-LEFT: 10px; FONT-WEIGHT: bold; FLOAT: left; COLOR: #333
}
.cvBoxTitleBarClose {
	PADDING-RIGHT: 10px; FLOAT: right; COLOR: #3867af; FONT-FAMILY: Verdana
}

.cvBoxBody {
	WIDTH: 100%; BACKGROUND-COLOR: #ffffff
}





</style>
 
</head>

<body >

 <{if $type == 0}> 
 
<h1>


<span class="action-span">
<a href="/wondershare/ad.php?action=add_edit&act=add&w_type=<{$w_type}>">添加广告</a>
</span>
<span class="action-span1">
<{$web_info}>广告管理
</span>

<div style="clear:both"></div>
</h1>
<{/if}>

<form method="POST" action="/wondershare/ad.php?action=index">
    <img height="22" border="0" width="26" alt="SEARCH" src="images/icon_search.gif">
        <!-- 分类 -->
    <span style="margin-left:2px; font-size:13px; ">广告投放位置：</span><select name="ad_location"><option <{if "0|0|0" == $ad_location}> selected="selected" <{/if}>  value="0|0|0">所有位置</option>
	<{foreach from=$delivery_info item=info}>
    
	<option  <{if $ad_location == "<{$info.position_id}>|0|<{$info.position_type}>" }> selected="selected" <{/if}> value="<{$info.position_id}>|0|<{$info.position_type}>" >-<{$info.position_name}></option>
	<{foreach from=$info.cat_info item=cat_info}>
	<option  <{if $ad_location == "<{$info.position_id}>|<{$cat_info.cat_id}>|<{$info.position_type}>" }> selected="selected" <{/if}> value="<{$info.position_id}>|<{$cat_info.cat_id}>|<{$info.position_type}>">&nbsp;&nbsp;<{$cat_info.cat_title}></option>
	<{/foreach}>
	<{/foreach}>
	</select>
	 <!-- 产品标签 --><span style="margin-left:40px; font-size:13px">广告尺寸：</span>
    <select name="ad_size">
	<option value="0" <{if "0"== $ad_size}> selected="selected" <{/if}>   >所有尺寸</option>
	<{foreach from=$size_info item=info}>
	<option value="<{$info.ad_size}>" <{if $info.ad_size == $ad_size}> selected="selected" <{/if}>  ><{$info.ad_size}></option>
	<{/foreach}>
	</select>
	
	<span style="margin-left:40px; font-size:13px; ">广告名称：</span>
        <!-- 关键字 -->
     <input type="text" size="25" name="ad_name" value="<{if $ad_name!=''}><{$ad_name}><{else}>广告名称<{/if}>" onblur="if(this.value=='')this.value='广告名称';" onclick="if(this.value=='广告名称')this.value=''"  style="margin-left:10px; margin-right:10px;">
   <input type="hidden" name="w_type" value="<{$w_type}>" >
    <input type="submit" class="button"  name="search" value=" 搜索 " >

</form>
<table width="100%" cellspacing="1" cellpadding="2" id="list-table" class="list-div" style="margin-top:10px;">
<tbody>
  <tr>
  <th >广告ID</th> 
    <th>广告名称</th>
	<th>位置</th>
	<th>广告尺寸</th>
	<th>广告图片</th>
	<th>广告登录页面</th>
	<th>操作人员</th>
    <th>最后操作时间</th>
	<th>编辑</th>
	

  </tr>
  <{foreach from=$ad_info item=info}>
 
  <tr  id="tr_<{$info.ad_id}>">
    <td width="5%" align="center"  >
	<input value="<{$info.ad_id}>" name="ID[]" type="checkbox" > <{$info.ad_id}></td>
	<td width="20%" align="center" >
	<{$info.ad_name}>
	</td>
    <td width="10%" >
	<{assign var="position_name" value= ''}> 
	<{foreach from=$info.position_size item=position key=key  }>
	   <{if $position_name == '' }>
		<p align="center"> -<{$position.position_name}> </p>
		<{assign var="position_name" value= $position.position_name}> 
		<{elseif  $position_name  != $position.position_name  && $position_name != ''}>
		<p align="center"> -<{$position.position_name}> </p>
	    <{assign var="position_name" value= $position.position_name}> 
	  <{/if}>	
	 <{/foreach}>
	</td>
	<td width="5%" align="center" >
	<{$info.ad_size}>
	</td>
	
	<td width="15%" align="center" >
	<{if $info.ad_photo != ''}>
     <a  target="_blank" href="<{$info.ad_photo}>" ><img width="130px" height="100" src="<{$info.ad_photo}>" /></a>
	 <{/if}>
	</td>
	<td width="15%" align="center" > 
	<{$info.ad_url}>
	</td>
	<td width="5%" align="center" > 
	<{$info.ad_user_update}>
	</td>
	<td width="5%" align="center" > 
	<{$info.ad_update}>
	</td>
	
     <td width="10%" align="center">
    <a href="#" onclick="{if(confirm('确定要删除记录吗?')){delete_ad(<{$info.ad_id}>,'list_ad_id','ad');}return false;}" >删除</a> | 
	<a href="/wondershare/ad.php?action=add_edit&act=edit&w_type=<{$w_type}>&ad_id=<{$info.ad_id}>" > 编辑 </a>
    </td>

  </tr>

  <{/foreach}>
  
  <tr>
	    <{if $type == 0}> <td  align="center"><input name="checkall" value="checked" onclick="v=document.getElementsByName('ID[]');if(this.checked){for(i=0;i<v.length;i++)v[i].checked=true;}else{for(i=0;i<v.length;i++)v[i].checked=false;}" type="checkbox">全选</td> 
		<{else}><td></td><{/if}>

		<td colspan="12"><{$page_url}> &nbsp; 共有 <span id="total"><{$total}> </span>条记录
		<{if $type == 0}> 
		&nbsp;&nbsp;<input name="sub" value="删除" type="button" onclick="delete_ad(0,'list','ad');">
		<{else}><{if $type == 2 && $total>0}><input name="sub" value="取消选择" type="button" onclick="on_radio();"><{/if}><{/if}>
		</td>
	</tr>
	
  
  </tbody>
</table>


</body>
</html>